package com.jxx.controller;

import com.jxx.pojo.Category;
import com.jxx.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/category/")
public class CategoryController {
    @Autowired
    private CategoryService categoryService;

    @RequestMapping("findCategory")
    public List<Category> findCategory(){
        return categoryService.findCategory();
    }
}
